lib: Ensure an error is set in ensure_unlinked() if errno != ENOENT
authorColin Walters <walters@verbum.org>
Sat, 18 Feb 2017 15:15:39 +0000 (10:15 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 20 Feb 2017 14:36:09 +0000 (14:36 +0000)
commitc9356a50b860aacace0ca819d0849854de9edd4d
treeb00e20f4a94eea3787f4f5eb9a58a8cb822a692b
parent6b93cb3173bd7f5e39dddb8ebc01bd216b6a4792
lib: Ensure an error is set in ensure_unlinked() if errno != ENOENT

We hit this with:
```
27411 unlink("/boot/efi/EFI/fedora/grub.cfg.new") = -1 EROFS (Read-only file system)
```
from the grub2 code.

https://github.com/projectatomic/rpm-ostree/issues/633

Closes: #694
Approved by: giuseppe
src/libotutil/ot-gio-utils.c